package com.yonyou.cyxdms.sysAuth.service.dto;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;

import java.io.Serializable;


/**
 * <p>
 * 公司组织
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */

public class ComOrganizationDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 组织ID
     */
    private Integer orgId;
    /**
     * 组织类型ID
     */
    private Integer orgType;
    /**
     * 业务类型
     */
    private Integer busiType;
    /**
     * 公司ID
     */
    private Integer companyId;
    /**
     * 组织代码
     */
    private String orgCode;
    /**
     * 组织名称
     */
    private String orgName;
    /**
     * 上级组织ID
     */
    private Integer parentOrgId;
    /**
     * 备注
     */
    private String remark;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 经销商代码
     */
    private String dealerCode;
    private String sapOrgCode;
    private Boolean isDeleted;

    public ComOrganizationDTO() {
        super();
    }


    public Integer getOrgId() {
        return orgId;
    }


    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }


    public Integer getOrgType() {
        return orgType;
    }


    public void setOrgType(Integer orgType) {
        this.orgType = orgType;
    }


    public Integer getBusiType() {
        return busiType;
    }


    public void setBusiType(Integer busiType) {
        this.busiType = busiType;
    }


    public Integer getCompanyId() {
        return companyId;
    }


    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }


    public String getOrgCode() {
        return orgCode;
    }


    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }


    public String getOrgName() {
        return orgName;
    }


    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }


    public Integer getParentOrgId() {
        return parentOrgId;
    }


    public void setParentOrgId(Integer parentOrgId) {
        this.parentOrgId = parentOrgId;
    }


    public String getRemark() {
        return remark;
    }


    public void setRemark(String remark) {
        this.remark = remark;
    }


    public Integer getStatus() {
        return status;
    }


    public void setStatus(Integer status) {
        this.status = status;
    }


    public String getDealerCode() {
        return dealerCode;
    }


    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }


    public String getSapOrgCode() {
        return sapOrgCode;
    }


    public void setSapOrgCode(String sapOrgCode) {
        this.sapOrgCode = sapOrgCode;
    }


    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }


    @Override
    public String toString() {
        return "ComOrganizationDTO{" +
                "orgId=" + orgId +
                ", orgType=" + orgType +
                ", busiType=" + busiType +
                ", companyId=" + companyId +
                ", orgCode=" + orgCode +
                ", orgName=" + orgName +
                ", parentOrgId=" + parentOrgId +
                ", remark=" + remark +
                ", status=" + status +
                ", dealerCode=" + dealerCode +
                ", sapOrgCode=" + sapOrgCode +
                ", isDeleted=" + isDeleted +
                "}";
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author quankk
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "orgId");
    }

}
